<extend name="Index/index"/>

<block name="main">	

			<div class="container">
		    	<div id="search">
		      		<form action="<{:U('index')}>" method='get'>
		      			 影院名称: <input type="text" name="name" class='search'>
		      			 <input class="button" type="submit" >
		     		 </form>
		    	</div>
			</div>
			<div class="row-fluid sortable">		
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<!-- <h2><i class="icon-user"></i> Members</h2> -->
						<div class="box-icon">
							<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
							<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
						</div>
					</div>
					<div class="box-content">
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th>影院图片</th>
								  <th>影院ID</th>
								  <th>影院名</th>
								  <th>地址</th>
								  <th>影院风格</th>
								  <th>电话</th>
								  <th>状态</th>
								  <th>添加时间</th>
								  <th>操作</th>
							  </tr>
						  </thead>
						  	
						  <tbody>
							<!-- start volist -->
							<empty name="list">
						  		<tr>
						  			<tr><td colspan=9 style="font-size:20px;text-align:center;height:40px;">暂无数据</td></tr>
						  		</tr>
						  	</empty> 
						  	<volist name="list" id="vo">
								<tr>
									<!-- <td class="center"><{$vo.icon}></td> -->
									<empty name="vo['icon']">
										<td><img src="__PUBLIC__/images/touxiang.jpg"style="width:40px;height:40px;"></td>
									<else/>
										<td><img src="__ROOT__/Uploads/<{$vo.icon|substr=0,8}>/<{$vo.icon|substr=8}>"style="width:40px;height:40px;"></td>
									</empty>
									<td class="center"><{$vo.id}></td>
									<td class="center"><{$vo.name}></td>
									<td class="center"><{$vo.address}></td>
									<td class="center"><{$vo.style}></td>
									<td class="center"><{$vo.phone}></td>
									<td class="center">
										<a class="btn btn-change"><span class="label label-success icon-white status" bz="<{$vo.id}>">
											<if condition="$vo.status eq '0'">营业中
											<else/>未营业
											</if>
										</span></a>
									</td>
									<td class="center"><{$vo.regtime|date='Y/m/d',###}></td>
									<td class="center">
										
										<a class="btn btn-info" href="<{:U('edit',array('id'=>$vo['id']))}>">
											<i class="icon-edit icon-white"></i>  
											编辑                                            
										</a>
										<a class="btn btn-danger" href="<{:U('del',array('id'=>$vo['id']))}>">
											<i class="icon-trash icon-white"></i> 
											删除
										</a>
									</td>
								</tr>
							
							</volist> <!-- end volist -->

						  </tbody>
					  </table>            
					</div>
				</div><!--/span-->
			
			</div><!--/row-->
			<{$page}>
			<script>
				$(function(){
					// console.log($('.status'));
					$('.status').click(function(){
						// alert('pig');
						// var sex = $(this).html();
						// sex = sex.replace(/\s/g,'');
						var	id = $(this).attr('bz');
						// console.log(id);
						// console.log(sex);
						var info ='id='+ id  ;
						// console.log(info);
						var	_this = $(this);
						$.ajax({
							type:'get',
							url:"<{:U('change')}>",
							data:info,
							success:function(data){
								console.log(data);
								_this.html(data);
							},
							// dataType:'json',
						})
					})
				})

			</script>
			</block>